import * as React from "react";
import "./index.less";
import VendingMachineEdit from "./vending-machine-edit";
declare let window: any;
export interface IEdit {
  defaultProps?: any;
  editBasicData?: () => JSX.Element;
  editExtraData?: () => JSX.Element;
}

export default class VendingMachine implements IEdit {
  defaultProps = {
    showIndex: "1",
    homePage: {
      qrCode: true,
      homeImage: [
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-1.jpg",
          imgHref: ""
        },
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-2.jpg",
          imgHref: ""
        },
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-3.jpg",
          imgHref: ""
        },
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-4.jpg",
          imgHref: ""
        },
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-5.jpg",
          imgHref: ""
        },
        {
          imgSrc:
            "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-6.jpg",
          imgHref: ""
        }
      ]
    },
    paymentPage: {
      imgSrc:
        "//qianmi-web.oss-cn-hangzhou.aliyuncs.com/x-site/public/ad-screen/statics/vending-machine/1080x1920-7.jpg"
    }
  };
  editBasicData = () => {
    const { BasicEditDialog } = window.xSiteIntegrate;
    return (
      <BasicEditDialog>
        <VendingMachineEdit
          homePath={["props", "homePage"]}
          paymentPath={["props", "paymentPage"]}
          showPath={["props", "showIndex"]}
        />
      </BasicEditDialog>
    );
  };
}
